package org.example.item.model.entity;

import lombok.Getter;
import lombok.Setter;
import org.example.misc.model.CommonEntity;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "item")
@org.hibernate.annotations.Table(appliesTo = "item", comment = "商品信息表")
@Getter
@Setter
public class Item implements Serializable {
    private static final long serialVersionUID = -3362718636599091183L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false)
    private Long id;
    @Column
    private String itemName;

    @Column
    private String skuNo;
    /**
     * 后台类目ID
     */
    @Column
    private Long backGroundCategoryId;
    @Column
    private Long brandId;


    @Embedded
    private CommonEntity commonEntity;
}
